package com.mgq.design.create.builder;

/**
 * <b>功能：</b>build类<br>
 * <b>Copyright mgq</b>
 * <li>版本&nbsp;&nbsp;&nbsp;&nbsp;修改日期&nbsp;&nbsp;&nbsp;&nbsp;部　　门&nbsp;&nbsp;&nbsp;&nbsp;作　者&nbsp;&nbsp;&nbsp;&nbsp;变更内容</li><hr>
 * <li>v1.0&nbsp;&nbsp;&nbsp;&nbsp;20220318&nbsp;&nbsp;营业后台&nbsp;&nbsp;&nbsp;&nbsp;马广奇&nbsp;&nbsp;&nbsp;&nbsp;创建类</li>
 * <br><br>
 *
 * @author 马广奇
 * @version 2022-03-18 10:23
 */
public class MealBuilder {
    /**
     * <b>功能描述：</b>准备素食<br>
     * <b>修订记录：</b><br>
     * <li>20220318&nbsp;&nbsp;|&nbsp;&nbsp;马广奇&nbsp;&nbsp;|&nbsp;&nbsp;创建方法</li><br><br>
     *
     * @return void
     */

    public static Meal prepareVegMeal() {
        Meal meal = new Meal();
        meal.addItem(new VegBurger());
        meal.addItem(new Coke());
        return meal;
    }

    /**
     * <b>功能描述：</b>准备非素食<br>
     * <b>修订记录：</b><br>
     * <li>20220318&nbsp;&nbsp;|&nbsp;&nbsp;马广奇&nbsp;&nbsp;|&nbsp;&nbsp;创建方法</li><br><br>
     *
     * @return Meal
     */

    public static Meal prepareNonVegMeal() {
        Meal meal = new Meal();
        meal.addItem(new ChickenBurger());
        meal.addItem(new PorkBurger());
        meal.addItem(new Pepsi());
        return meal;
    }

    /**
     * <b>功能描述：</b>提供一个meal实例,让外部去组合,这个方法可能不能对外暴露,不符合建造者的初衷.把复杂对象的创建隐藏起来<br>
     * <b>修订记录：</b><br>
     * <li>20220318&nbsp;&nbsp;|&nbsp;&nbsp;马广奇&nbsp;&nbsp;|&nbsp;&nbsp;创建方法</li><br><br>
     *
     * @return Meal
     */

    public static Meal mealInstance() {
        return new Meal();
    }
}
